<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page pageEncoding="UTF-8" %>
<!DOCTYPE HTML>
<html>
<head>
    <title>Tables</title>
    <meta charset="UTF-8"/>
    <LINK REL=StyleSheet HREF="admin-style.css" TYPE="text/css" MEDIA=screen>
</head>
<body>
<section id="container" class="round">
<div id="header">
    <a href='admin.html'>
        <img id="logo" src="logo.jpg"/>
    </a>
</div>
<table class="round" id="list-table">
    <thead>
    <tr>
        <th>Номер</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach var="table" items="${requestScope.tables}">
        <tr>
            <td>${table.id}</td>
            <td>
                <form action="editTable" method="POST">
                    <input type="hidden" name="id" value="${table.id}"/>
                    <input type="submit" name="delete" value="Удалить"/>
                </form>
            </td>
        </tr>
    </c:forEach>
    </tbody>
</table>
<form action="editTable" method="POST">
    <table>
        <tr>
            <td>Номер</td>
            <td><input type="text" name="id"/></td>
            <td>
                <input type="submit" name="save" value="Добавить"/>
            </td>
        </tr>
    </table>
</form>
</section>
</body>
</html>
